import Vue from 'vue';

import { Header } from 'mint-ui';
import { Swipe, SwipeItem, Button, Lazyload } from 'mint-ui';

Vue.component(Swipe.name, Swipe);
Vue.component(SwipeItem.name, SwipeItem);
Vue.component(Button.name, Button);

Vue.component(Header.name, Header);


Vue.use(Lazyload);

import VueResource from 'vue-resource';
Vue.use(VueResource);
Vue.http.options.root = './localData';
import moment from 'moment';
Vue.filter("dateFormat", function(dateStr, pattern = "YYYY-MM-DD HH:mm:ss") {
    return moment(dateStr).format(pattern);
})
import './lib/mui/css/mui.min.css';
import 'mint-ui/lib/style.css';
import './lib/mui/css/icons-extra.css';
import './css/index.css';
import index from './index.vue';

import VuePreview from 'vue-preview';
Vue.use(VuePreview);

import vr from './router.js';
new Vue({
    el: "#app",
    render: h => h(index),
    router: vr
})